import { View } from "@tarojs/components";
import MyButtonClass from "../../components/my-button-class";
import MyButtonHooks from "../../components/my-button-hooks";
import MyMultiButton from "../../components/my-multi-button";
import "./index.scss";

export default function Index() {
  let platform = process.env.TARO_ENV;

  return (
    <View className="index">
      {platform === "h5" && (
        <>
          <View>1.MyButtonClass</View>
          <MyButtonClass>Button h5</MyButtonClass>
        </>
      )}

      {platform === "weapp" && (
        <>
          <View>2.MyButtonHooks</View>
          <MyButtonHooks>Button weapp</MyButtonHooks>
        </>
      )}

      <View>3.跨平台组件</View>
      <MyMultiButton type="default">MyMultiButton</MyMultiButton>
    </View>
  );
}
